package com.lyc.Mapper;

import com.lyc.pojo.User;
import lombok.Setter;
import org.mybatis.spring.SqlSessionTemplate;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
@Setter
public class UserMapperIpml  implements UserMapper{
    private SqlSessionTemplate sqlSession;
    @Override
    public List<User> selectUser() {
        UserMapper mapper = sqlSession.getMapper( UserMapper.class);
        return mapper.selectUser();
    }

}

//我们的所有操作，都是使用sqlSession来执行，在原来，现在都是用SqlSessionTemplate（模板）
